package com.health.api.fallback;


import com.health.api.client.MedicineClient;
import com.health.api.client.WareHouseClient;
import com.health.api.model.producer.ProducerRegisterRequest;
import com.health.api.model.transporter.AddWareHouseItemRequest;
import com.health.api.model.transporter.TransporterRegisterRequest;
import com.health.common.model.vo.UserKeyVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;


/**
 * @author zhexueqi
 * @ClassName ItemClientFallback
 * @since 2024/5/14    21:35
 */
@Slf4j
public class WareHouseClientFallback implements FallbackFactory<WareHouseClient> {
    @Override
    public WareHouseClient create(Throwable cause) {
        return new WareHouseClient() {

            @Override
            public boolean addWareHouseItem(AddWareHouseItemRequest addWareHouseItemRequest) {
                log.error("调用addItem方法失败，原因是：{}", cause.getMessage());
                return false;
            }
        };
    }
}
